const express = require('express');
const router = express.Router();
const scoreAnalysisExportController = require('../controllers/scoreAnalysisExport.controller');
const { verifyToken } = require('../middlewares/auth.middleware');

/**
 * @route GET /api/scoreExport/getExaminationByUserId
 * @desc 获取用于导出成绩的考试列表
 * @access 需要token验证
 */
router.get('/getExaminationByUserId', verifyToken, scoreAnalysisExportController.getBackupList);

/**
 * @route GET /api/scoreExport/getClassesByUserId
 * @desc 根据用户ID获取班级列表
 * @access 需要token验证
 */
router.get('/getClassesByUserId', verifyToken, scoreAnalysisExportController.getClassesByUserId);

/**
 * @route GET /api/scoreExport/getStudentPaper
 * @desc 获取学生试卷信息
 * @access 需要token验证
 */
router.post('/getStudentPaper', verifyToken, scoreAnalysisExportController.getStudentPaper);

/**
 * @route POST /api/scoreExport/getExaminationAndStudentScore
 * @desc 根据考试ID获取考试信息和学生成绩
 * @access 需要token验证
 */
router.post('/getExaminationAndStudentScore', verifyToken, scoreAnalysisExportController.getExaminationAndStudentScore);

/**
 * @route GET /api/scoreExport/getKnowledgePointRate
 * @desc 获取知识点得分率分析数据
 * @access 需要token验证
 */ 
router.get('/getKnowledgePointRate', verifyToken, scoreAnalysisExportController.getKnowledgePointRate);

/**
 * @route GET /api/scoreExport/getQuestionQuality
 * @desc 获取题目质量分析数据
 * @access 需要token验证
 */ 
router.get('/getQuestionQuality', verifyToken, scoreAnalysisExportController.getQuestionQuality);

/**
 * @route GET /api/scoreExport/getAbnormalQuestion
 * @desc 根据考试ID和班级ID获取异常题目信息
 * @access 需要token验证
 */ 
router.get('/getAbnormalQuestion', verifyToken, scoreAnalysisExportController.getAbnormalQuestion);

module.exports = router; 